home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-05-03 | 902 b | 37 lines | [TEXT/MPS ] |
- # Warning: This will change all of your source code! (I suggest you make
- # a copy of the target directory before running it.
- # Instructions:
- # Set the current directory to desired target directory
- # Put "canon.dict" into that directory and run the following script
-
-
- set curdir "`directory`"
-
- set newdir "`getfilename -d -m 'Select directory to convert.'`"
- exit if !{newdir}
- set dict "`getfilename -m 'Select canon dictionary.'`"
- exit if !{dict}
-
- directory {newdir}
-
- # Canon the files into <file>-canon
-
- for each in ≈.h ≈.c ≈.a
- echo "{each}"
- canon "{dict}" "{each}" > "{each}"-canon
- end
-
- # Catenate x-canon file back into original file (to save ckids etc.)
-
- for converted in ≈.h-canon ≈.c-canon ≈.a-canon
- (evaluate "{converted}" =~ /(≈)®1-canon/) ∑∑ Dev:Null
- set original "{®1}"
- echo "{converted}" "{original}"
- catenate "{converted}" > "{original}"
- end
-
- delete ≈-canon
-
- directory {curdir}
-
-